<cp-navbar (onClickLeft)="onClickLeft()" [border]="false"></cp-navbar>
<div class="container">
  <div class="header">
    <div class="form-item border-bottom">
      <i class="icon icon-search"></i>
      <input
        type="search"
        [(ngModel)]="keyword"
        maxlength="16"
        placeholder="请输入楼盘名称或地址"
        (keypress)="handleKeypress($event)"
      />
    </div>
  </div>
  <div class="body">
    <div class="block hot" *ngIf="hot.length">
      <div class="pubtitle">
        <div class="left">
          <i class="icon icon-hot"></i>
          <p>热门搜索</p>
        </div>
        <span></span>
      </div>
      <div class="list">
        <div class="item" *ngFor="let item of hot" (click)="setKeyword(item)">{{ item }}</div>
      </div>
    </div>
    <div class="gutter" *ngIf="history.length"></div>
    <div class="block history" *ngIf="history.length">
      <div class="pubtitle">
        <div class="left">
          <i class="icon icon-search"></i>
          <p>历史搜索</p>
        </div>
        <span (click)="clearHistory()">清空</span>
      </div>
      <div class="list">
        <div class="item" *ngFor="let item of history" (click)="setKeyword(item)">{{ item }}</div>
      </div>
    </div>
  </div>
</div>
